// vue.config.js
const webpack = require("webpack");
/**
 * @type {import('@vue/cli-service').ProjectOptions}
 */
 module.exports = {
    // 选项...
    filenameHashing:false,
    publicPath:"./",
    css:{
        extract:true
    },
    chainWebpack: config =>{
      config.plugin('extract-css').tap(args => {
          args[0].chunkFilename="css/chunk-[name].css";
          return args
      });
      //config.plugin('external').use(webpack.ExternalsPlugin,["commonjs", ["ffi-napi"]]);
    },
    pluginOptions: {
      electronBuilder: {
        nodeIntegration: true,
        // List native deps here if they don't work
        externals: ['ffi-napi','ref-napi'],
        // If you are using Yarn Workspaces, you may have multiple node_modules folders
        // List them all here so that VCP Electron Builder can find them
        //nodeModulesPath: ['C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules', './node_modules'],
        //experimentalNativeDepCheck: true,
        builderOptions: {
          // options placed here will be merged with default configuration and passed to electron-builder
        }
      }
    }
  }